package com.cg.controller;


import com.cg.dto.AddLikeDTO;
import com.cg.result.R;
import com.cg.service.IVideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 加
 * @since 2025-01-17
 */
@RestController
@CrossOrigin
@RequestMapping("/api/video")
@Api(value = "videoController",description = "欢迎来到视频管理",tags = "视频管理")
public class VideoController {
    @Autowired
    private IVideoService videoService;
    @ApiOperation("新增收藏")
    @PostMapping("addLike")
    public R addLike(AddLikeDTO addLikeDTO){
        return videoService.addLike(addLikeDTO);
    }
}
